import request from "@/util/request"

const api_name = '/api/user'

export default {
  // 用户登录
  login(userInfo) {
    return request({
      url: `${api_name}/login`,
      method: 'post',
      data: userInfo  // 后端接收json数据
    })
  },
  // 获取用户id信息接口
  getUserInfo(){
    return request({
      url: `${api_name}/auth/getUserInfo`,
      method: 'get',
    })
  },
  // 用户认证
  userAuth(userAuth){
    return request({
      url: `${api_name}/auth/userAuth`,
      method: 'post',
      data: userAuth
    })
  }
}
